package main.client;

import java.io.Serializable;



public class Item implements Serializable {
	  
	private static final long serialVersionUID = 1L;
	private int id;
	private String name;
	private String description;
	private String categoryName;
	private int category;
	private int bought;
	private int quantity = 1;
	private float price;
	private String image;

		/**
		 * Empty constructor
		 */
	  public Item() {}
	  
	  /**
	   * Alternative constructor
	   * @param name
	   * @param description
	   * @param category
	   */
	  public Item(String name, String description, Integer category) {
		  this.name = name;
		  this.description = description;
		  this.category = category;
	  }
	  /**
	   * Alternative constructor
	   * @param name
	   * @param description
	   * @param categoryName
	   * @param bought
	   */
	  public Item(String name, String description, String categoryName, Integer bought) {
		  this.name = name;
		  this.description = description;
		  this.categoryName = categoryName;
		  this.bought = bought;
	  }
	  /**
	   * Alternative constructor
	   * @param id
	   * @param name
	   * @param quantity
	   * @param price
	   */
	  public Item(Integer id, String name, Integer quantity, Float price) {
		  this.id = id;
		  this.name = name;
		  this.quantity = quantity;
		  this.price = price;
	  }
	  /**
	   * Alternative constructor
	   * @param name
	   * @param description
	   * @param bought
	   * @param price
	   */
	  public Item(String name, String description,Integer bought, Float price) {
		  this.name = name;
		  this.description = description;
		  this.bought = bought;
		  this.price = price;
	  }
	  /**
	   * Alternative constructor
	   * @param name
	   * @param price
	   */
	  public Item(String name, Float price) {
		  this.name = name;
		  this.price = price;
	  }
	  /**
	   * Alternative constructor
	   * @param id
	   * @param name
	   * @param description
	   * @param categoryName
	   * @param category
	   * @param bought
	   * @param quantity
	   * @param price
	   * @param image
	   */
	  public Item(Integer id, String name, String description, String categoryName, Integer category, Integer bought, Integer quantity, Float price, String image) {
		  this.id = id;
		  this.name = name;
		  this.description = description;
		  this.categoryName = categoryName;
		  this.category = category;
		  this.bought = bought;
		  this.quantity = quantity;
		  this.price = price;
		  this.image = image;
	  }
	  
	  /**
	   * A copy function for an item 
	   * @param copy
	   */
	public void copy(Item copy) {
		  this.name = copy.getName();
		  this.description = copy.getDescription();
		  this.bought = copy.getBought();
		  this.category = copy.getCategory();
		  this.id = copy.getId();
		  this.price = copy.getPrice();
		  this.image = copy.getImage();
	  }
	  /**
	   * Get:ers for the local variables
	   * 
	   */
	  public void setId(int id) {this.id = id;}
	  public void setName(String name) {this.name = name;}
	  public void setDescription(String description) {this.description = description;}
	  public void setCategory(Integer category) {this.category = category;}
	  public void setBought(int bought) {this.bought = bought;}
	  public void setQuantity(int quantity) {this.quantity = quantity;}
	  public void setPrice(float price) {this.price = price;}
	  public void setImage(String image) {this.image = image;}
	  public void setCategoryName(String categoryName) {this.categoryName = categoryName;}
	  
	  /**
	   * Get:ers for the local variables
	   * 
	   */
	  public int getId() {return id;}
	  public String getName() {return name;}
	  public String getDescription() {return description;}
	  public Integer getCategory() {return category;}
	  public int getBought() {return bought;}
	  public int getQuantity() {return quantity;}	
	  public float getPrice() {	return price;}
	  public String getImage() {return image;}
	  public String getCategoryName() {return categoryName;}
	  


	  
}